/*
* 本文件只对浏览器的默认样式以及最高全局类名做处理
*/

/* 覆盖antd全局样式 */

// modal
// 解决按钮点击弹框后，鼠标不能立马失焦，导致快速点击，弹出两个框的问题
.ant-modal-mask {
  pointer-events: unset !important;
}

// 设置modal中body的最大高度
.ant-modal {
  .ant-modal-body {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    margin-right: -24px;
    padding-right: 24px;
    .ant-modal-confirm-btns {
      padding-right: 24px;
    }
  }
}

.ant-btn + .ant-btn {
  margin-left: 8px;
}
.ant-btn + .ant-switch {
  margin-left: 8px;
}
.ant-switch + .ant-btn {
  margin-left: 8px;
}

//   全局样式

::selection {
  color: unset;
  background-color: #e2f0fe;
}

::-webkit-scrollbar {
  //滚动条的宽度
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  //滚动条的设置
  background-color: #e6e6e6;
  background-clip: padding-box;
  min-height: 28px;
  &:hover {
    background-color: #bbb;
  }
}
::-webkit-scrollbar-track-piece {
  //滚动条凹槽的颜色，还可以设置边框属性
  background-color: #f8f8f8;
}

// 覆盖全局样式
body {
  margin: 0;
  overflow: hidden;
  font-family:
    -apple-system,
    'PingFang SC',
    'Microsoft YaHei',
    BlinkMacSystemFont,
    Segoe UI,
    Hiragino Sans GB,
    Helvetica Neue,
    Helvetica,
    Arial,
    sans-serif,
    Apple Color Emoji,
    Segoe UI Emoji,
    Segoe UI Symbol;
}
* {
  box-sizing: border-box !important;
}

p {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

//修改chrome浏览器自动填充的样式
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-transition-delay: 99999s;
  -webkit-transition:
    color 99999s ease-out,
    background-color 99999s ease-out;
}

#root {
  height: 100vh;
  width: 100vw;
}

#printRoot {
  display: none;
}

@media print {
  @page {
    @bottom-center {
      content: counter(page) '/' counter(pages);
    }
  }
  body {
    overflow: visible !important;
    height: 100% !important;

    & > * {
      display: none !important;
    }

    #printRoot {
      display: block !important;
      * {
        color: #000 !important;
        border-color: #000 !important;
      }
    }
  }
}
